#ifndef __THREAD_POOL__
#define __THREAD_POOL__
#include <my_header.h>
#include "tidArr.h"
#include "taskQueue.h"
#include "stringStack.h"
#define  ROOT_PATH "/home/zhou/cloud-storage-project/wp-v2/userfile/"
//线程池基础
typedef struct threadPool_s
{
    tidArr_t tidArr; //线程id数组
    taskQueue_t taskQueue;//任务队列
    pthread_mutex_t mutex;
    pthread_cond_t cond;
    int exitFlag;
}threadPool_t;
int threadPoolInit(threadPool_t *pthreadPool,int workerNum);
int makeworker(threadPool_t *pthreadPool);
int initTcp(char *ip, char *port);
int epollAdd(int epfd, int fd);
int epollDel(int epfd, int fd);
int transFile(int netfd);
//小火车
typedef struct train_s{
    int flag;          
    int length;
    char data[1000];               
}train_t;
int recvn(int sockfd,void *buf,int length);
/////////////func各种结构体
int func_cd(char * target_path,stringStack_t * stack,char * username);             
int func_ls(char * ant,stringStack_t * stack,char * username);
int func_puts(int netfd,char * true_name,char * filename,stringStack_t * stack);
int func_gets(int netfd,char * target_path,stringStack_t * stack);
int func_remove(const char * target_path,stringStack_t * stack);
int func_pwd(char * ant,stringStack_t * stack);
int func_mkdir(char * target_path,stringStack_t * stack);
int func_rmdir(char * target_path,stringStack_t * stack);







#endif 
